package com.cfpl.admin_service.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cfpl.admin_service.DTO.PlantLocationDTO;
import com.cfpl.admin_service.VO.AdminPlantLocationList;
import com.cfpl.admin_service.VO.FertilizationDetails;
import com.cfpl.admin_service.VO.PlantLocationVO;
import com.cfpl.admin_service.VO.VegEnvMonitoring;
import com.cfpl.project_common.pojo.PlantingLocation;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 14720
* @description 针对表【planting_location(种植地点信息表)】的数据库操作Service
* @createDate 2023-10-23 10:31:59
*/
public interface PlantingLocationService extends IService<PlantingLocation> {

    /**
     * 条件分页查询种植地点信息
     * @param page 分页对象
     * @param plantLocationDTO 查询条件
     */
    IPage<PlantLocationVO> pageQueryPlantLocation(Page<PlantLocationVO> page,PlantLocationDTO plantLocationDTO);

    /**
     * 根据种植地点ID查询当前种植地点的所有肥料记录
     * @param plantLocationID 种植地点
     */
    IPage<FertilizationDetails> queryFertilizerByPlantLocationID(Page<FertilizationDetails> page, Long plantLocationID);


    /**
     * 查询当前管理员所在种植户的所有种植地点
     */
    List<AdminPlantLocationList> queryDicOfPlantLocation();
    /**
     * 根据种植地点id查询某一具体果蔬的环境监测数据
     * @param id 种植地点id
     * @return
     */
    List<VegEnvMonitoring> queryVegByEnvMonitoring(Long id);


}
